package com.milo.java7.io.character;

import org.junit.Test;

import java.io.*;

/**
 * @author Milo Lee
 * @date 2021-04-14 16:04
 */
public class InputStreamReaderTest {


    @Test
    public void test1() throws IOException {

        InputStreamReader ir = new InputStreamReader(new FileInputStream("E:\\test.txt"));//文本内容为“双子孤狼”
        BufferedReader br = new BufferedReader(ir);
        String s;
        while (null != (s = br.readLine())){
            System.out.println(s);//输出双子孤狼
        }
    }
}
